import { createApp } from 'vue'
import { createPinia } from 'pinia'


import App from './App.vue'
import router from './router'
import '@/utils/rem'

import ElementPlus from 'element-plus'

import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import '@/styles/index.css'

import zhCn from 'element-plus/es/locale/lang/zh-cn'

import injectComponents from '@/components'

import pinia from '@/stores';

import '@/styles/element/light.css'
import '@/styles/element/dark.css'

import 'virtual:svg-icons-register'

import WujieVue from 'wujie-vue3';

// import { fetch, hostMap, lifecycles, degrade, props, attrs } from '@/wujie/lifecycle'

const app = createApp(App)

app.use(createPinia())
app.use(injectComponents)
app.use(pinia)
app.use(router)
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(WujieVue);
app.mount('#app')


// const { setupApp } = WujieVue
// setupApp({
//   name: 'DataVisual', // 数据洞察
//   url: hostMap('//localhost:4424/'),
//   attrs,
//   exec: true,
//   props,
//   fetch: fetch,
//   degrade,
//   ...lifecycles
// })